import state from "./state"

//改变状态
export default {
	updetaUserInfo(state,userInfo){
		 uni.setStorageSync("userInfo",userInfo)
		state.userInfo = userInfo
	},
	setHistorList(state,val){
		let list = state.historList
		if((list.length > 0) && list.findIndex(item => item === val) > -1)	return
		
		list.unshift(val)
		uni.setStorageSync("historList",list)
		state.historList = list
	},
	clearHistory(state){
		uni.removeStorageSync("historList")
		state.historList = []
	},
	setLabelList(state,list){
		uni.setStorageSync("labelList",list)
		state.labelList = list
		
	}
}